package edu.ustc.iproject.service.impl;

import java.util.List;

import edu.ustc.iproject.bean.Student;
import edu.ustc.iproject.dao.StudentDAO;
import edu.ustc.iproject.service.StudentService;



public class StudentServiceImpl implements StudentService {

	public StudentDAO studentDao;
		
	public StudentDAO getStudentDao() {
		return studentDao;
	}

	public void setStudentDao(StudentDAO studentDao) {
		this.studentDao = studentDao;
	}

	

	//saveStudent
	public void saveStudent(Student student) {
		
		this.studentDao.saveStudent(student);
		
	}

	public void deleteStudent(Student student) {
		
		this.studentDao.deleteStudent(student);
		
	}

	public List<Student> findAllStudents() {
		// TODO Auto-generated method stub
		
		return this.studentDao.findAllStudents();
		
	}

	public Student findStudentById(int stuId) {
		
		return this.studentDao.findStudentById(stuId);
		
	}

	public Student loginStudent(String count, String code) {

		return this.studentDao.loginStudent(count, code);
		
	}

	public void updateStudent(Student student) {
		
		this.studentDao.updateStudent(student);
		
	}


}
